<template>
  <router-view v-slot="{ Component }">
    <keep-alive exclude="Detail,Login,Register,ShopCart">
      <component :is="Component" />
    </keep-alive>
  </router-view>
  <AppFooter />
</template>
<script>
import AppFooter from '@/components/AppFooter.vue'
import { useStore } from 'vuex'
export default {
  name: 'App',
  components: { AppFooter },
  setup () {
    // 刷新的时候自动请求加载
    const store = useStore()
    store.dispatch('updateCartCount')
  }
}
</script>

<style lang="less" scoped>
</style>
